<template>
  <div id="wrap">
    <h1>通过 RouterView传值</h1>
    <RouterLink :to="{ name: 'StuDemo61Son01' }">第一子组件</RouterLink>

    <!-- 通过 RouterView传值 -->
    <RouterView v-slot="{ Component }">
      <component :is="Component" :view="obj"/>
    </RouterView>
  </div>
</template>

<script lang="ts">
export default {
  name: 'dayStuDemo61',
};
</script>

<script lang="ts" setup>
import { ref } from 'vue';
export interface classA {
  name: string;
  sex: string;
  age: number;
}
const obj = ref<classA>({
  name: '小明',
  sex: '男',
  age: 18,
});
</script>

<style lang="scss"></style>
